unitDef = {
	unitname            = "wizard",
	name                = "Wizard",
	description         = "A knowledgeable student of the arcane arts.",
	acceleration        = 0.4,
	brakerate           = 0.2,
	buildcostenergy     = 10,
	buildcostmetal      = 10,
	buildpic            = "wizard.png",
	buildtime           = 10,
	canattack           = true,
	canguard            = true,
	canmove             = true,
	canpatrol           = true,
	canstop             = true,
	category            = "land wizard",
	--corpse              = "dead", --fixme
	collisionVolumeOffsets   = "0 0 0",
	collisionVolumeScales    = "14 25 10",
	collisionVolumeTest      = 1,
	collisionVolumeType      = "box",
	
	cloakcost           = 0,
	cloakcostmoving     = 3,
	mincloakdistance    = 100,
	
	footprintx          = 1,
	footprintz          = 1,
	icontype            = "default", 
	idleautoheal        = 1,
	idletime            = 240,
	leavetracks         = true,
	mass                = 20,
	maxdamage           = 30,
	maxslope            = 36,
	maxvelocity         = 1,
	movementclass       = "infantry",
	movestate           = 0,
	objectname          = "wizard.s3o",
	script              = "wizard_anim.lua",
	
	sfxtypes            = {
		explosiongenerators = {
			"custom:NONE",
			"custom:blood_spray",
			"custom:blood_explode",
		},
	},
	
	sightdistance       = 1000,
	turnrate            = 800,
	upright             = true,
	
	weapons             = {
		--{def = "LB1"},
		--{def = "LB2", mainDir = "0 0 1", maxAngleDif = 90},
		{def = "FIREBALL", mainDir = "0 0 1", maxAngleDif = 200},
		--{def = "MM1", mainDir = "0 0 1", maxAngleDif = 90},
		--{def = "G2", mainDir = "0 0 1", maxAngleDif = 200},
		{def = "G1", mainDir = "0 0 1", maxAngleDif = 200},
		{def = "SHIELD2"},
	},
	
	weaponDefs          = {
		FIREBALL = {
		name                 = "Fireball",
		areaofeffect         = 300,
		--cegtag               = "fireball", --fixme,
		cegtag               = "BANISHERTRAIL",
		craterboost     = 10,
		cratermult      = 1,
		
		damage = {default = 50},
		
		explosiongenerator   = "custom:fireball",
		edgeeffectiveness    = .7,
		flighttime           = 10,
		interceptedbyshieldtype = 2,
		model                = "",
		proximitypriority    = -1.5,
		range                = 800,
		reloadtime           = 3,
		startvelocity        = 300,
		tolerance            = 1000,
		tracks               = true,
		trajectoryheight     = .5,
		turnrate             = 20000, --between 0 and 64000
		turret               = true,
		weaponacceleration   = 100,
		weapontype           = "MissileLauncher",
		weaponvelocity       = 600,
		},
	
		MM1 = {
		name                 = "Magic Missile (lv. 1)",
		areaofeffect         = 5,
		cegtag               = "magicmissile",
		
		damage = {default = 10},
		
		dance                = 20,
		flighttime           = 6,
		interceptedbyshieldtype = 1,
		model                = "",
		range                = 600,
		reloadtime           = 2,
		startvelocity        = 300,
		tolerance            = 1000,
		tracks               = true,
		trajectoryheight     = .3,
		turnrate             = 30000, --between 0 and 64000
		turret               = true,
		weaponacceleration   = 100,
		weapontype           = "MissileLauncher",
		weaponvelocity       = 400,
		},
		
		G1 = {
		name                 = "Telekinesis (lv. 1)",
		areaofeffect         = 10,
		burst                = 5,
		burstrate            = .03,
		corethickness        = 0.5,
		
		damage = {default = 0.001},
		
		duration             = .05,
		explosiongenerator   = "custom:blood_spray",
		impactonly           = true,
		impulseboost         = 50,
		impulsefactor        = 50,
		intensity            = .2,
		interceptedbyshieldtype = 1,
		proximitypriority    = 10,
		range                = 125,
		reloadtime           = 1.5,
		rgbcolor             = "0 0 0.5",
		rgbcolor2            = "0 0.25 0.5",
		thickness            = 5,
		tolerance            = 1000,
		turret               = true,
		weapontype           = "LaserCannon",
		weaponvelocity       = 2200,
		},
		
		G2 = {
		name                 = "Telekinesis (lv. 2)",
		areaofeffect         = 10,
		burst                = 6,
		burstrate            = .01,
		corethickness        = 0.5,
		
		damage = {default = 0.001},
		
		duration             = .05,
		explosiongenerator   = "custom:blood_spray",
		impactonly           = true,
		impulseboost         = 25,
		impulsefactor        = -1000,
		intensity            = .2,
		interceptedbyshieldtype = 1,
		range                = 300,
		reloadtime           = .2,
		rgbcolor             = "0.5 0 0",
		rgbcolor2            = "0.5 0.25 0",
		thickness            = 5,
		tolerance            = 1000,
		turret               = true,
		weapontype           = "LaserCannon",
		weaponvelocity       = 2200,
		},
		
		SHIELD = {
		name                 = "Shield",
		
		damage = { default = 10, },  --fixme?
		
		exteriorshield       = true,
		isshield             = true,
		shieldalpha          = .3,
		shieldbadcolor       = "0.5 0 0",
		shieldgoodcolor      = "0.9 0.9 0.9",
		shieldenergyuse      = 10,
		shieldforce          = 10,
		shieldintercepttype  = 15, -- 1111
		shieldmaxspeed       = 5,--fixme
		shieldpower          = 50,--fixme
		shieldpowerregen     = .5, --fixme
		shieldpowerregenenergy = 1,--fixme
		shieldradius         = 40,
		shieldrepulser       = true,
		shieldstartingpower  = 50,
		smartshield          = true, --dont affect allies
		texture1             = "", --fixme
		visibleshield        = true,
		visibleshieldhitframes = 5,
		visibleshieldrepulse = true,
		weapontype           = "Shield",
		},
		
		SHIELD2 = {
		name                 = "Shield",
		
		damage = { default = 10, },  --fixme?
		
		--exteriorshield       = true,
		isshield             = true,
		shieldalpha          = .3,
		shieldbadcolor       = "0.5 0 0",
		shieldgoodcolor      = "0.9 0.9 0.9",
		shieldenergyuse      = 10,
		shieldforce          = 10,
		shieldintercepttype  = 15, -- 1111
		shieldmaxspeed       = 5,--fixme
		shieldpower          = 100,--fixme
		shieldpowerregen     = 1, --fixme
		shieldpowerregenenergy = 1,--fixme
		shieldradius         = 200,
		shieldrepulser       = true,
		shieldstartingpower  = 100,
		smartshield          = true, --dont affect allies
		texture1             = "", --fixme
		visibleshield        = true,
		visibleshieldhitframes = 10,
		visibleshieldrepulse = true,
		weapontype           = "Shield",
		},
		
		LB1 = {
		name            = "Lightning Bolt (lv. 1)", --lb1 is the chainweapon
		areaofeffect         = 10,
		
		damage = {
			default     = 30,
			light       = 24,
			chain       = 30,
			structure   = 15,
		},
		
		beamdecay       = .2,--fixme
		largebeamlaser  = true,
		scrollspeed     = 10, --fixme
		tilelength      = 100, --fixme
		texture1        = "lightning",
		minintensity    = .7,
		--[[
		texture1 = beam
		texture2 = beamend
		texture3 = muzzle
		texture4 = flare
		--]]
		--explosiongenerator = "custom:NONE",
		range           = 1000,
		reloadtime      = 5,
		--rgbcolor        = "0 0 0.3",
		thickness       = 40,
		tolerance       = 1000,
		turret          = true,
		waterweapon     = true,
		weapontype      = "BeamLaser",
		},
		
		LB2 = {
		name            = "Lightning Bolt (lv. 2)",
		areaofeffect         = 10,
		
		damage = {
			default     = 30,
			light       = 24,
			chain       = 30,
			structure   = 15,
		},
		
		duration        = 10,
		--explosiongenerator = "custom:NONE",
		--noexplode       = true,
		range           = 1000,
		reloadtime      = 5,
		rgbcolor        = "0 0 .3",
		thickness       = 5,
		tolerance       = 1000,
		turret          = true,
		waterweapon     = true,
		weapontype      = "LaserCannon",
		weaponvelocity  = 2000,
		},
	},
}

return lowerkeys({ wizard = unitDef })
